package com.ydc.ln.tutorial.j2se.ms;

public class Ch1001 extends Ch1001Base{
    public static void main(String[] args) {
        Father f = new Father();
        Child c = new Child();
        Father fc = new Child();
        System.out.println(f.getName());
        System.out.println(f.getStaticName());
        System.out.println(c.getName());
        System.out.println(c.getStaticName());
        System.out.println(fc.getName());
        System.out.println(fc.getStaticName());
    }
}

class Father {
    String getName() {
        return "father";
    }
    static String getStaticName() {
        return "staticFather";
    }
}

class Child extends Father {
    String getName() {
        return "child";
    }
    
    static String getStaticName() {
        return "staticChild";
    }
}
